package com.solotiger.okex.service.impl;

import com.solotiger.okex.dao.UserDao;
import com.solotiger.okex.dao.UserTokenDao;
import com.solotiger.okex.domain.OkexUser;
import com.solotiger.okex.domain.OkexUserToken;
import com.solotiger.okex.service.IShiroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Author: Lin.Qiang
 * Date:2018/8/8 0008
 */
@Service
public class ShiroServiceImpl implements IShiroService {

    @Autowired
    private UserTokenDao userTokenDao;

    @Autowired
    private UserDao userDao;

    @Override
    public OkexUserToken findByToken(String token) {
        return userTokenDao.findByToken(token);
    }

    @Override
    public OkexUser findUserById(Integer userId) {
        return userDao.findById(userId);
    }
}
